package com.imay.live.activity.user;

import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;

import com.githang.statusbar.StatusBarCompat;
import com.imay.live.R;
import com.imay.live.activity.BaseRequestActivity;

import static com.imay.live.activity.user.ResigterActivity.STATUS_BIND_PHONE;
import static com.imay.live.activity.user.ResigterActivity.STATUS_MODIFY_PHONE;
import static com.imay.live.activity.user.ResigterActivity.USER_STATUS;

/**
 * Created by chan on 2017/7/12 0012.
 */

public abstract class UserBaseActivity extends BaseRequestActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //修改手机绑定界面样式不一样
        if (STATUS_MODIFY_PHONE!=getIntent().getIntExtra(USER_STATUS, -1)&&STATUS_BIND_PHONE!=getIntent().getIntExtra(USER_STATUS, -1)) {
            getTitleBar().setTitleColor(getResources().getColor(R.color.text_20));
            getTitleBar().setLeftImageResource(R.mipmap.btn_04xinxi);
            int margin = getResources().getDimensionPixelOffset(com.imay.R.dimen.margin_side);
            getTitleBar().getLeftImageView().setPadding(margin, 0, margin, 0);
            getTitleBar().setBackgroundColor(Color.WHITE);
            StatusBarCompat.setStatusBarColor(this, Color.WHITE, true);
        }
    }
}
